<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>8.6. Advanced Features</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css"/>
	</head>
	<body>
		<h1 id="REC-RPL_Advanced_Features">REC-RPL Advanced Features</h1>
		<h2 id="Management_of_Composition_of_REC-RPL">Management of Composition of REC-RPL</h2>
		<p>We are going to see how to use libraries and REC-RPL composition in order to create a set of elements based on library elements and data types through an example.</p>
		<ol>
			<li>Create a library to define the 	data types and elements types
				<br/>
				<br/>
				<img height="159" width="676" border="0" src="Images/8.6.%20Advanced%20Features_html_2284e832.png"/>
				<br/>For this example, we call it 
				<b>lib_cps</b> to express it's a library dedicated to define some components.
				<br/>
				<br/>
			</li>
			<li>Add some 	data types and create a physical node component 
				<b>Board</b> 	containing the following physical attributes
				<br/>
				<br/>
				<img height="97" width="187" border="0" src="Images/8.6.%20Advanced%20Features_html_62ca2f9f.png"/> 
				<img height="93" width="174" border="0" src="Images/8.6.%20Advanced%20Features_html_m233d6be5.png"/>
				<br/>
				<br/>
			</li>
			<li>In the 	tree, select the component 
				<b>Board</b>, 	choose 
				<b>'REC 	/ RPL &gt; Create a REC from selection</b>'
				<br/>
				<br/>
				<img height="176" width="660" border="0" src="Images/8.6.%20Advanced%20Features_html_fecc182.png"/>
				<br/>
				<br/>In the REC creation window, the component and its children are automatically added to the REC.
				<br/>
				<br/>Notice the message &quot;REC have references to external elements&quot;, an additional window shows the elements that will not be instantiated in the destination model. Any RPL of the to be created REC Board will be linked to these elements
				<br/>
				<br/>Remark: it is possible to add these external elements in the REC by pressing the button 
				<img height="20" width="24" border="0" src="Images/8.6.%20Advanced%20Features_html_c388e3a.png"/> and selecting them. In that case, these elements will be considered as &ldquo;part of&rdquo; the created REC and any RPL will have its own data types.
				<br/>
				<br/>
				<img height="603" width="822" border="0" src="Images/8.6.%20Advanced%20Features_html_7759190e.png"/>
				<br/>
				<br/>Now we are going to create a Rack compound by two replicas of Board.
				<br/>
				<br/>
			</li>
			<li>Create a 	physical node component 
				<b>Rack</b>
				<br/>
				<br/>
				<img height="85" width="160" border="0" src="Images/8.6.%20Advanced%20Features_html_m52755ad8.png"/>
				<br/>
				<br/>
			</li>
			<li>In the 	tree, right click on 
				<b>Rack</b> 	and choose 
				<b>'REC/RPL 	&gt; Instantiate a RPL from a REC' </b>
				<br/>
				<br/>
				<img height="176" width="656" border="0" src="Images/8.6.%20Advanced%20Features_html_25459aa1.png"/>
				<br/>
				<br/>Then select 
				<b>REC_Board</b> and add the suffix _1 and validate twice with no modifications.
				<br/>
				<br/>
				<img height="632" width="546" border="0" src="Images/8.6.%20Advanced%20Features_html_m5a8a33fd.png"/>
				<br/>
				<br/>Repeat the operation another time to create a second 
				<b>Board</b> on the 
				<b>Rack</b>
				<br/>
				<br/>Remark: is it possible to place the newly created RPL into the directory 
				<b>REC Catalog / RPL</b> to ease the reading of the model.
				<br/>
				<br/>
				<img height="139" width="250" border="0" src="Images/8.6.%20Advanced%20Features_html_m5a294393.png"/>
				<br/>
				<br/>Notice the message &quot;REC have references to external elements&quot;, the button trigger an additional window allowing to select from the elements linked to the REC elements which elements will be linked to elements of the RPL.
				<br/>
				<br/> 
			</li>
			<li>In the 	tree, right click on 
				<b>Rack</b> 	and choose 
				<b>'REC/RPL 	&gt; Create a REC from selection&rsquo; </b>
			</li>
		</ol>
		<p>
			<img height="206" width="713" border="0" src="Images/8.6.%20Advanced%20Features_html_m7754385b.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<p>
			<img height="617" width="534" border="0" src="Images/8.6.%20Advanced%20Features_html_m1d2fb26.png"/>
		</p>
		<ol>
			<li>Two choices are possible to 	create the REC Rack:
				<ol>
					<li>Simple 		REC linked to all elements viewed in the wizard, which will happen 		by clicking directly on OK (same process than REC Board creation, 		not detailed below)
						<ol>
							<li>Pro: Simple way to create a 			REC</li>
							<li>Con: If 			Board is more complicated than a self-contained component, 			(allocated functions, interfaces), some elements will not be 			included if they weren&rsquo;t selected when creating the 			REC_Rack, even if they are part of an existing RPL.</li>
							<li>Con: If Board evolves by 			adding other elements, these elements will not be added 			automatically to the REC_Rack and its RPL. You will have to update 			manually REC_Rack to include these new elements.</li>
						</ol>
					</li>
					<li>Compound 		REC, where REC Rack is only a Component Rack with two Replica of 		Board (whatever elements are included in Board) (detailed below)
						<ol>
							<li>Pro: all elements of a 			Replica of Board will be included automatically, even if REC_Board 			is updated</li>
						</ol>
					</li>
				</ol>
			</li>
		</ol>
		<p>
			<br/>

			<br/>
		</p>
		<p>For both 
			<b>Board</b>, select the related RPL like below. In the main dialog, RPL are added and components Board are now colored in purple, meaning that a related RPL have been added to the REC. These elements will be also added at RPL instanciation
		</p>
		<p>
			<img height="756" width="1040" border="0" src="Images/8.6.%20Advanced%20Features_html_b1a38c3.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<p>
			<img height="756" width="1015" border="0" src="Images/8.6.%20Advanced%20Features_html_m4e31a690.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<p>At end of the wizard, created 
			<b>REC_Rack</b> is linked to the Rack and both RPL of 
			<b>Board</b>
		</p>
		<p>
			<img height="140" width="303" border="0" src="Images/8.6.%20Advanced%20Features_html_7b1766c3.png"/> 
			<img height="154" width="421" border="0" src="Images/8.6.%20Advanced%20Features_html_m793c1829.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<ol>
			<li>In a 	model with dependencies to the 
				<b>lib_cps</b>:
			</li>
		</ol>
		<p>
			<img height="306" width="262" border="0" src="Images/8.6.%20Advanced%20Features_html_m6ec962dc.png"/>
		</p>
		<p>Create a RPL of the 
			<b>REC_Rack</b> in Physical System
		</p>
		<p>
			<img height="206" width="694" border="0" src="Images/8.6.%20Advanced%20Features_html_m1eb7c6e0.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<p>
			<img height="612" width="530" border="0" src="Images/8.6.%20Advanced%20Features_html_4b18a5c9.png"/>
		</p>
		<p>In the model, a component Rack has been created and two RPL of boards.</p>
		<p>
			<img height="247" width="220" border="0" src="Images/8.6.%20Advanced%20Features_html_3dbc82aa.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<p>
			<i>Note: There is no component Board created. Both replica should have been created and initialized after the instantiation of the RPL_Rack. This is a current limitation of the tooling, but it should not be the case</i>.
			<br/>
			For both RPL of Board, an &ldquo;Update selected RPL from its REC&rdquo; must be triggered. Once these Board have been initialized, another &ldquo;Update selected RPL from its REC&rdquo; on the RPL_Rack can be necessary if there is elements linking the two Board. (which is not the case here)
		</p>
		<p>
			<img height="70" width="245" border="0" src="Images/8.6.%20Advanced%20Features_html_3cc99ac0.png"/> 
			<img height="123" width="628" border="0" src="Images/8.6.%20Advanced%20Features_html_m1e59d7b.png"/>
		</p>
		<p>We have now a full RPL of Rack</p>
		<p>
			<img height="190" width="247" border="0" src="Images/8.6.%20Advanced%20Features_html_4822ef4b.png"/>
		</p>
		<p>
			<br/>

			<br/>
		</p>
		<h2 id="Promotion_of_a_REC_to_a_Library">Promotion of a REC to a Library</h2>
		<p>From elements of a model, it would be possible to create a REC into a referenced library. 
			<br/>
			Elements will be copied into the library and become a REC and initial selected elements will be considered as a RPL of the REC stored in the library.
		</p>
		<p>
			<b>This feature is not available yet </b>
		</p>
		<h2 id="Selecting_all_related_Elements_of_a_given_REC_on_a_diagram">Selecting all related Elements of a given REC on a diagram</h2>
		<p>It is possible to select all elements of a given REC that are displayed on a diagram.</p>
		<p>To do so, select a source element from the REC, right click "Capella Select &gt; Related REC Elements &gt; REC"
			This will set the current selection to all this REC source elements, that are displayed on the diagram</p>
		<p>
			<img border="0" src="Images/select_related_rec.png"/>
		</p>
		<h2 id="Selecting_all_related_Elements_of_a_given_RPL_on_a_diagram">Selecting all related Elements of a given RPL on a diagram</h2>
		<p>It is possible to select all elements of a given RPL that are displayed on a diagram.</p>
		<p>To do so, select an element from the RPL, right click "Capella Select &gt; Related RPL Elements &gt; RPL"
			This will set the current selection to all this RPL elements, that are displayed on the diagram</p>
		<p>This is particularly useful to copy/paste a layout from a REC to its RPLs</p>
		<p>
			<img border="0" src="Images/select_related_rpl.png"/>
		</p>
	</body>
</html>